<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateShopsTable extends Migration
{
    /**
     * Run the migrations.
     * 分销店 表
     * @return void
     */
    public function up()
    {
        Schema::create('shops', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('分销名称');
            $table->integer('shop_type_id')->comment('店铺类型');
            $table->string('account')->comment('帐号');
            $table->string('email')->comment('邮箱');
            $table->string('phone')->comment('手机号');
            $table->string('avatar')->default(null)->comment('头像');
            $table->string('password')->comment('密码');
            $table->timestamp('email_verified_at')->nullable()->comment('是否激活邮箱');
            $table->softDeletes()->comment('软删除');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shops');
    }
}
